home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
cpphtp2
/
code.jar
/
code
/
ch03
/
fig03_25.txt
< prev
next >
Wrap
Text File
|
1998-02-27
|
409b
|
17 lines
1 // Fig. 3.25: fig03_25.cpp
2 // Using overloaded functions
3 #include <iostream.h>
4
5 int square( int x ) { return x * x; }
6
7 double square( double y ) { return y * y; }
8
9 int main()
10 {
11 cout << "The square of integer 7 is " << square( 7 )
12 << "\nThe square of double 7.5 is " << square( 7.5 )
13 << endl;
14
15 return 0;
16 }